home *** CD-ROM | disk | FTP | other *** search
- // dvctrl.h : Declaration of the DVocx OLE control class.
-
- /////////////////////////////////////////////////////////////////////////////
- // DVocx : See dvctrl.cpp for implementation.
-
- class DVocx : public COleControl
- {
- DECLARE_DYNCREATE(DVocx)
-
- // Constructor
- public:
- DVocx();
- VIEW m_view;
- OBJECT m_screen;
- DRAWPORT m_dp;
- BOOL ok_to_draw;
- UINT m_nTimeOut;
- afx_msg LONG OnExpose(UINT,LONG);
- afx_msg LONG OnResize(UINT,LONG);
- void Init();
- void Paint (WPARAM wParam, LPARAM lParam);
- virtual LRESULT WindowProc( UINT message, WPARAM wParam, LPARAM lParam );
-
- #ifdef STRICT
- WNDPROC dv_winproc ;
- #else
- FARPROC dv_winproc ;
- #endif
-
- // Overrides
-
- // Drawing function
- virtual void OnDraw(
- CDC* pdc, const CRect& rcBounds, const CRect& rcInvalid);
-
- // Persistence
- virtual void DoPropExchange(CPropExchange* pPX);
-
- // Reset control state
- virtual void OnResetState();
-
- // Implementation
- protected:
- ~DVocx();
-
- DECLARE_OLECREATE_EX(DVocx) // Class factory and guid
- DECLARE_OLETYPELIB(DVocx) // GetTypeInfo
- DECLARE_PROPPAGEIDS(DVocx) // Property page IDs
- DECLARE_OLECTLTYPE(DVocx) // Type name and misc status
-
- // Message maps
- //{{AFX_MSG(DVocx)
- afx_msg void OnTimer(UINT nIDEvent);
- afx_msg void OnDestroy();
- afx_msg void OnPaint();
- //}}AFX_MSG
- DECLARE_MESSAGE_MAP()
-
- // Dispatch maps
- //{{AFX_DISPATCH(DVocx)
- long m_updateRate;
- afx_msg void OnUpdateRateChanged();
- BOOL m_fUseDblBuf;
- afx_msg void OnUseDoubleBufferingChanged();
- CString m_viewFile;
- afx_msg void OnViewFileChanged();
- BOOL m_autoUpdate;
- afx_msg void OnAutoUpdateChanged();
- double m_scale;
- afx_msg void OnScaleChanged();
- afx_msg void StartUpdating();
- afx_msg void StopUpdating();
- afx_msg void SetView(LPCTSTR szViewFile);
- afx_msg void CloseView();
- afx_msg void UpdateWindow();
- afx_msg void ZoomTo(double scale);
- //}}AFX_DISPATCH
- DECLARE_DISPATCH_MAP()
-
- afx_msg void AboutBox();
-
- // Event maps
- //{{AFX_EVENT(DVocx)
- //}}AFX_EVENT
- DECLARE_EVENT_MAP()
-
- // Dispatch and event IDs
- public:
- enum {
- //{{AFX_DISP_ID(DVocx)
- dispidUpdateRate = 1L,
- dispidUseDoubleBuffering = 2L,
- dispidViewFile = 3L,
- dispidAutoUpdate = 4L,
- dispidScale = 5L,
- dispidStartUpdating = 6L,
- dispidStopUpdating = 7L,
- dispidSetView = 8L,
- dispidCloseView = 9L,
- dispidUpdateWindow = 10L,
- dispidZoomTo = 11L,
- //}}AFX_DISP_ID
- };
- };
-